. _
[technology]
   _____ _      __      ______                                          __
  / ___/(_)____/ /__   / ____/___  ____ ___  ____ ___  ____ _____  ____/ /____
  \__ \/ / ___/ //_/  / /   / __ \/ __ `__ \/ __ `__ \/ __ `/ __ \/ __  / ___/
 ___/ / / /__/ ,<    / /___/ /_/ / / / / / / / / / / / /_/ / / / / /_/ (__  )
/____/_/\___/_/|_|   \____/\____/_/ /_/ /_/_/ /_/ /_/\__,_/_/ /_/\__,_/____/

A small collection of terminal things I actually use.

❯ fastfetch

Quick system overview.

      
bash
fastfetch

output:

      
bash
..' danial@danials-MacBook-Pro ,xNMM. -------------------------- .OMMMMo OS: macOS Tahoe 26.2 (25C56) arm64 lMM" Host: MacBook Pro (13-inch, M1, 2020) .;loddo:. .olloddol;. Kernel: Darwin 25.2.0 cKMMMMMMMMMMNWMMMMMMMMMM0: Uptime: 1 day, 4 hours, 20 mins .KMMMMMMMMMMMMMMMMMMMMMMMWd. Packages: 277 (brew), 17 (brew-cask) XMMMMMMMMMMMMMMMMMMMMMMMX. Shell: zsh 5.9 ;MMMMMMMMMMMMMMMMMMMMMMMM: Display (Color LCD): 2048x1280 in 13", 60 Hz [Built-in] :MMMMMMMMMMMMMMMMMMMMMMMM: WM: Quartz Compositor 1.600.0 .MMMMMMMMMMMMMMMMMMMMMMMMX. WM Theme: Multicolor (Dark) kMMMMMMMMMMMMMMMMMMMMMMMMWd. Theme: Liquid Glass 'XMMMMMMMMMMMMMMMMMMMMMMMMMMk Font: .AppleSystemUIFont [System], Helvetica [User] 'XMMMMMMMMMMMMMMMMMMMMMMMMK. Cursor: Fill - Black, Outline - White (32px) kMMMMMMMMMMMMMMMMMMMMMMd Terminal: iTerm 3.4.19 ;KMMMMMMMWXXWMMMMMMMk. Terminal Font: Menlo-Regular (13pt) "cooc*" "*coo'" CPU: Apple M1 (8) @ 3.20 GHz GPU: Apple M1 (8) [Integrated] Memory: 7.04 GiB / 8.00 GiB (88%) Swap: 10.18 GiB / 11.00 GiB (93%) Disk (/): 217.36 GiB / 228.27 GiB (95%) - apfs Local IP (en0): 192.168.0.215/24 Battery (bq20z451): 64% (6 hours, 32 mins remaining Locale: en_US.UTF-8

Good for screenshots, debugging, or flexing your uptime like it means something.

❯ ps

Process inspection without opening a GUI and lying to yourself.

common flags:

-a all processes
-x include processes without a tty
-u user-oriented output
-o custom columns
-p target a PID

show info about the current shell:

      
bash
ps -o pid,user,rss,vsz,%mem,%cpu -p $$

❯ kill

For when a process stops responding to hints.

important signals:

-15 ask politely
-9 end the conversation

Use -15 first unless you enjoy cleaning up messes.

❯ tmux

Terminal multiplexer. Once you use it, not using it feels broken.

list sessions:

      
bash
tmux list-sessions

output:

      
bash
0: 1 windows (created Wed Feb 18 16:53:15 2026) (attached) 1: 1 windows (created Wed Feb 18 18:24:27 2026)

attach to one:

      
bash
tmux attach-session -t 0

❯ curl

The Swiss army knife you already use but pretend you understand.

get the weather by city name:

      
bash
curl wttr.in/tehran

read the community maintained cheatsheets for any tool:

      
bash
curl cheat.sh/bash

retrieve your public IP address:

      
bash
curl http://icanhazip.com

output:

      
bash
5.126.22.159

you can use the -v flag to see the full request and response:

      
bash
curl -v http://icanhazip.com

output:

      
bash
* Host icanhazip.com:80 was resolved. * IPv6: (none) * IPv4: 104.16.185.241, 104.16.184.241 * Trying 104.16.185.241:80... * Connected to icanhazip.com (104.16.185.241) port 80 > GET / HTTP/1.1 > Host: icanhazip.com > User-Agent: curl/8.7.1 > Accept: */* > * Request completely sent off < HTTP/1.1 200 OK < Date: Thu, 19 Feb 2026 20:11:53 GMT < Content-Type: text/plain < Content-Length: 13 < Connection: keep-alive < CF-RAY: 9d086a79dd469f1f-FRA < Access-Control-Allow-Origin: * < Access-Control-Allow-Methods: GET < Server: cloudflare < alt-svc: h3=":443"; ma=86400 < 5.126.22.159 * Connection #0 to host icanhazip.com left intact

test a SOCKS proxy:

      
bash
start=$(date +%s) while true; do clear echo "=== curl google ===" if curl -v --socks5 socks5://127.0.0.1:10808 https://www.google.com/generate_204 2>&1 \ | head -30 | grep -q 'Server hello'; then end=$(date +%s) echo "success" echo "Elapsed time: $((end - start))s" break fi sleep 2 done

same thing, but no proxy, just sanity check:

      
bash
start=$(date +%s) while true; do clear echo "=== curl google ===" if curl -v https://www.google.com/generate_204 2>&1 \ | head -30 | grep -q 'Server hello'; then end=$(date +%s) echo "success" echo "Elapsed time: $((end - start))s" break fi sleep 2 done

❯ fzf

Fuzzy search for everything. Makes grep feel medieval.

instead of this:

      
bash
history | grep "fig"

do this:

      
bash
history | fzf

❯ pbcopy

Clipboard glue for macOS. Useful with fzf.

copies the exact command:

      
bash
history | fzf --tac --preview 'echo {}' \ | awk '{$1=""; sub(/^ +/, ""); sub(/[[:space:]]+$/, ""); printf "%s", $0}' \ | pbcopy

❯ tee

Split output without losing your mind.

      
bash
ls | tee ls-output.txt

❯ nl

Line numbers without opening an editor.

      
bash
nl -w1 -s.

❯ grep

Recursive search when you don’t remember where anything lives.

      
bash
grep -Rw 'import' | sort

output:

      
bash
./ASCII-Art-Generator/Ascii-Converter.py:from colorama import Fore, Style ./ASCII-Art-Generator/Ascii-Converter.py:from colorama import init ./ASCII-Art-Generator/Ascii-Converter.py:from PIL import Image as ImagePIL ./ASCII-Art-Generator/Ascii-Converter.py:import argparse ./ASCII-Art-Generator/Ascii-Converter.py:import math ./ASCII-Art-Generator/Ascii-Converter.py:import numpy ./ASCII-Art-Generator/Ascii-Converter.py:import sys

❯ bat

cat, but readable.

basic:

      
bash
ps au | awk '/bat/ && !/awk/ {print}' | bat -l conf

output:

      
bash
─────┬──────────────────────────────────────────────────────────────────────────────────── │ STDIN ─────┼──────────────────────────────────────────────────────────────────────────────────── 1 │ danial 59114 0.0 0.0 410065568 192 s008 R+ 11:11PM 0:00.00 bat -l conf ─────┴────────────────────────────────────────────────────────────────────────────────────

with line numbers and diff-style highlights:

      
bash
ps au | awk '/bat/ && !/awk/ {print}' | bat --style="numbers,changes" -l conf

output:

      
bash
1 danial 61534 0.0 0.0 410071472 272 s008 U+ 11:13PM 0:00.00 bat --style=numbers,changes -l conf

full setup with my favorite theme:

      
bash
ps au | awk '/bat/ && !/awk/ {print}' | bat --style="numbers,changes" --theme="OneHalfDark" -l conf

output:

      
bash
1 danial 66796 0.0 0.0 410064944 160 s008 R+ 11:18PM 0:00.00 bat --style=numbers,changes --theme=OneHalfDark -l conf

processes sorted by memory usage:

      
bash
ps -o pid,user,rss,vsz,%mem,command -a \ | sort -rk 5 \ | bat --style="numbers,changes" --theme="OneHalfDark" -l conf

output:

      
bash
1 PID USER RSS VSZ %MEM COMMAND 2 60550 danial 6816 435305696 0.1 nvim . 3 35260 danial 5296 435306288 0.1 nvim . 4 45794 danial 4704 435314304 0.1 -zsh 5 38668 danial 416 435309456 0.0 tmux attach-session -t 0 6 47538 danial 384 435300144 0.0 tee errors.txt 7 67396 danial 1328 435300336 0.0 sort -rk 5 8 67395 root 1760 435299696 0.0 ps -o pid,user,rss,vsz,%mem,command -a 9 45793 root 2096 435308112 0.0 login -fp danial 10 35549 root 2032 435308688 0.0 login -fp danial 11 5761 root 1920 435308784 0.0 login -fp danial 12 1118 root 1920 435308912 0.0 login -fp danial 13 47536 danial 400 435299792 0.0 less 14 36340 danial 400 435300368 0.0 less 15 67397 danial 240 410066144 0.0 bat --style=numbers,changes -l conf 16 47534 danial 2960 435284368 0.0 /Python -m http.server 8080 17 49130 danial 480 435309360 0.0 /bin/zsh -l 18 51609 danial 448 435309840 0.0 /bin/zsh -il 19 35550 danial 448 435314112 0.0 -zsh 20 34853 danial 592 435313984 0.0 -zsh 21 34391 danial 432 435314080 0.0 -zsh 22 6175 danial 432 435309264 0.0 -zsh 23 5762 danial 448 435314016 0.0 -zsh 24 3426 danial 1216 435313952 0.0 -zsh 25 2545 danial 1216 435314000 0.0 -zsh 26 1119 danial 448 435313920 0.0 -zsh

top 10 only, no command noise:

      
bash
ps -x -o pid,user,rss,vsz,%mem,comm -a \ | sort -rk 5 \ | head -n 11 \ | bat --style="numbers,changes" --theme="OneHalfDark" -l conf

output:

      
bash
1 PID USER RSS VSZ %MEM COMM 2 49105 danial 207264 1909084928 2.5 /Applications/Cursor.app/Contents/Frameworks/Cursor Helper (Renderer).app/Contents/MacOS/Cursor Helper (Renderer) 3 1513 danial 191184 460284016 2.3 /Applications/Zen Browser.app/Contents/MacOS/plugin-container.app/Contents/MacOS/plugin-container 4 1500 danial 181072 456061584 2.2 /Applications/Zen Browser.app/Contents/MacOS/zen 5 42229 danial 177952 455850640 2.1 /Applications/Zen Browser.app/Contents/MacOS/plugin-container.app/Contents/MacOS/plugin-container 6 14604 danial 132768 472709488 1.6 /Applications/Zen Browser.app/Contents/MacOS/plugin-container.app/Contents/MacOS/plugin-container 7 12957 danial 126512 439716368 1.5 /Applications/Zen Browser.app/Contents/MacOS/plugin-container.app/Contents/MacOS/plugin-container 8 23279 danial 121392 439861504 1.4 /Applications/Zen Browser.app/Contents/MacOS/plugin-container.app/Contents/MacOS/plugin-container 9 6543 danial 121504 439429728 1.4 /Applications/Zen Browser.app/Contents/MacOS/plugin-container.app/Contents/MacOS/plugin-container 10 49125 danial 89456 1892294064 1.1 Cursor Helper (Plugin): extension-host (retrieval-always-local) [1-3] 11 39369 danial 93776 439518944 1.1 /Applications/Zen Browser.app/Contents/MacOS/plugin-container.app/Contents/MacOS/plugin-container

top 10 only, no command noise, with column alignment and easier to read output:

      
bash
ps -x -o pid,user,rss,vsz,%mem,comm -a \ | sort -rk 5 \ | head -n 11 \ | awk ' NR==1 { printf "%-6s %-12s %-6s %s\n", "PID", "USER", "%MEM", "CMD" next } { n = split($6, a, "/") printf "%-6s %-12s %-6s %s\n", $1, $2, $5, a[n] }' \ | bat --style="numbers,changes" --theme="OneHalfDark" -l conf

output:

      
bash
1 PID USER %MEM CMD 2 1500 danial 5.9 Zen 3 14604 danial 3.2 Zen 4 44747 danial 1.8 Zen 5 42229 danial 1.2 Zen 6 1513 danial 1.2 Zen 7 1586 danial 0.9 SiriAUSP 8 12957 danial 0.9 Zen 9 77495 danial 0.8 Zen 10 80047 danial 0.7 Zen 11 79241 danial 0.7 Zen

❯ process substitution

Shell black magic that becomes normal fast.

this baiscally means that you can run a command on a file without having to save the changes to a temporary file first,
so you can mae sure the out put is exactly what you want.

changing your name in git config file:

      
bash
diff .gitconfig <(sed s/Danial\ M./Diddy/I .gitconfig) diff <(sort .gitconfig.bak) <(sort .gitconfig)

redirect stdout and stderr separately:

      
bash
bash example.sh > >(less) 2> >(tee errors.txt)

real use:

      
bash
python3 -m http.server 8080 > >(less) 2> >(tee errors.txt)

even works with editors:

      
bash
vim <(cat file1 file2)

❯ rsync / ssh / sshfs

Move files like an adult.

      
bash
rsync -av --progress -e 'ssh -p 2222' /home/danial/tmp/os clh@172.30.205.63:tmp/2

mount remote dirs:

      
bash
sshfs -p 2222 clh@172.30.205.63:/home/clh/tmp/ /home/danial/part-class/mnted-dir/

❯ lshw

Hardware info when you need facts.

      
bash
lshw -C network

onefetch

This is basicly fastfetch for git repositories.

personally, i like running it in every folder automatically,
just put this in your ~/.bashrc or ~/.zshrc and it'll improve your cd command:

      
bash
function replace_cd(){ if builtin cd "$@"; then if [ -d "$PWD/.git" ]; then onefetch . fi fi } alias cd="replace_cd"

output:

      
bash
JSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJS Danial M. ~ git version 2.50.1 (Apple Git-155) JSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJS ---------------------------------------------- JSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJS Project: punycode-site (1 branch) JSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJS HEAD: 8969f29 (main, origin/main) JSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJS Pending: 5+ JSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJS Version: 0.0.1 JSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJS Created: a week ago JSJSJSJSJSJSJSJSJ SJSJS JSJSJS Languages: JSJSJSJSJSJSJSJSJ SJS JSJS ● JavaScript (89.3 %) ● CSS (10.7 %) JSJSJSJSJSJSJSJSJ SJS JSJSJSJSJ Dependencies: 4 (Npm) JSJSJSJSJSJSJSJSJ SJSJ SJSJSJSJ Author: 100% Danial M. 40 JSJSJSJSJSJSJSJSJ SJSJSJ SJSJSJ Last change: 10 hours ago JSJSJSJSJSJSJSJSJ SJSJSJSJ JSJS URL: https://github.com JSJSJSJSJSJSJSJSJ SJSJSJSJS JSJ Commits: 40 JSJSJSJSJS JS JSJS JSJ Churn (1): terminal.js 1 JSJSJSJSJSJ SJSJSJ SJSJS tcp-server.js 1 JSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJS Lines of code: 4186 JSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJS Size: 33.28 MiB (187 files)

sudo !!

Rerun the last mistake with authority.

❯ figlet

Easy way to add swag to your terminal.

example 1:

      
bash
figlet -f slant "Service"

output:

      
bash
_____ _ / ___/___ ______ __(_)_______ \__ \/ _ \/ ___/ | / / / ___/ _ \ ___/ / __/ / | |/ / / /__/ __/ /____/\___/_/ |___/_/\___/\___/

example 2:

      
bash
figlet -w 450 -f ~/codes/ANSI_Shadow.flf "Service"

output:

      
bash
███████╗███████╗██████╗ ██╗ ██╗██╗ ██████╗███████╗ ██╔════╝██╔════╝██╔══██╗██║ ██║██║██╔════╝██╔════╝ ███████╗█████╗ ██████╔╝██║ ██║██║██║ █████╗ ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║██║ ██╔══╝ ███████║███████╗██║ ██║ ╚████╔╝ ██║╚██████╗███████╗ ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═════╝╚══════╝

Resources

0%